/**
 * @Author       : cxh
 * @Date         : 2021-12-28 16:26:30
 * @LastEditTime : 2021-12-28 16:44:17
 * @LastEditors  : cxh
 * @Description  : 123123
 * @FilePath     : \vue-wp-server-daily-0.0.1\vue-wp-server-daily-0.0.1\app\controller\user.js
 */
'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async index() {
    const { ctx } = this;
    // ctx.body = 'hi, user';
    ctx.body = await ctx.model.User.find();
  }
  async getUserList() {
    const { ctx } = this;
    console.log('body:', ctx.request.body);
    // ctx.body = 'hi, user';
    ctx.body = await ctx.model.User.find();
  }
  async createUser() {
    const { ctx } = this;
    // ctx.body = 'hi, user';
    ctx.body = await ctx.model.User.find();
  }
}

module.exports = UserController;
